<?
$menu = $this->loadMenu();
?>
<ul>
	<? foreach($menu as $link=>$label): ?>
		<li class="<? if(is_array($label)): ?>submenu<? endif; ?>">
		<? if(is_array($label)): ?>
			<a href="javascript:void(0)"<? if($link == $this->request->params[0]): ?> class="selected"<? endif; ?>><?= $label["label"]; ?></a>
			<ul>
				<? foreach($label["children"] as $sublink=>$sublabel): ?>
				<li>
					<? if($link == $this->request->params[0] && $sublink == $this->request->params[1]): ?>
						<strong><?= $sublabel; ?></strong>
					<? else: ?>
						<a href="/<?= $link; ?>/<?= $sublink ?>"><?= $sublabel; ?></a>
					<? endif; ?>
				</li>
				<? endforeach; ?>
			</ul>
		<? else: ?>
			<? if($link == $this->request->params[0]): ?>
				<strong><?= $label; ?></strong>
			<? else: ?>
				<a href="/<?= $link; ?>"><?= $label; ?></a>
			<? endif; ?>
		<? endif; ?>
		</li>
	<? endforeach; ?>
</ul>